Skip to content

docs: expand OpenAI-compatible endpoint recipes#563

Merged
enyst merged 2 commits into
mainfrom
openhands/openai-compatible-endpoint-docs
Jun 10, 2026
Merged

docs: expand OpenAI-compatible endpoint recipes#563
enyst merged 2 commits into
mainfrom
openhands/openai-compatible-endpoint-docs

Conversation

@enyst

@enyst enyst commented Jun 9, 2026

Copy link
Copy Markdown
Member
  • I have read and reviewed the documentation changes to the best of my ability.
  • If the change is significant, I have run the documentation site locally and confirmed it renders as expected.

Summary of changes

  • Stacked on docs: add OpenAI-compatible agent-server gateway guide #554 to expand the SDK Remote Agent Server OpenAI-compatible endpoint guide with copy/paste recipes for curl, the OpenAI Python SDK, the OpenAI JavaScript SDK, chat UI configuration, and voice/webhook-style conversation ID reuse.
  • Documents the base URL, session API key, openhands_<profile_name> model naming, X-OpenHands-ServerConversation-ID state handling, and current limitations (non-streaming, final text only, no OpenAI tool-call surface).
  • Adds visible links/notes from the SDK homepage, Remote Agent Server overview, and SDK architecture overview so users can find the endpoint.

Fixes OpenHands/software-agent-sdk#3540.

Validation:

  • Ran a lightweight docs check that parses docs.json and verifies modified MDX code fences, Tabs components, and local links are balanced/resolvable.

This PR was created by an AI agent (OpenHands) on behalf of the user.

@enyst can click here to continue refining the PR

Base automatically changed from openhands/openai-chat-completions-gateway to main June 10, 2026 17:10
@enyst

enyst commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

@OpenHands rebase this on main, please, and pay attention that the PR it was stacked on changed the number of the example then was merged

@openhands-ai

openhands-ai Bot commented Jun 10, 2026

Copy link
Copy Markdown

I'm on it! enyst can track my progress at all-hands.dev

Co-authored-by: openhands <openhands@all-hands.dev>
@enyst enyst force-pushed the openhands/openai-compatible-endpoint-docs branch from e76293e to 998ef46 Compare June 10, 2026 17:13

enyst commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

Rebased this branch onto main and force-pushed the updated PR branch. The stacked #554 changes are now upstream, and the OpenAI-compatible gateway example references now point to examples/02_remote_agent_server/15_openai_compatible_gateway.py.

Validation run:

  • git diff --check
  • lightweight docs check for docs.json, modified MDX code fences, Tabs-like components, and local links

This comment was created by an AI agent (OpenHands) on behalf of the user.

@openhands-ai

openhands-ai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Since my last summary, there were no additional repository changes.

Final status:

  • ✅ The PR comment request was completely addressed.

    • Rebased openhands/openai-compatible-endpoint-docs onto main.
    • Accounted for the merged stacked PR and confirmed the example number changed to 15_openai_compatible_gateway.py.
    • Force-pushed the rebased branch to update PR docs: expand OpenAI-compatible endpoint recipes #563.
    • Posted a PR comment summarizing the update.
  • ✅ Instructions were followed faithfully.

    • Used GitHub/API tooling rather than browser interaction.
    • Preserved the existing PR and updated its branch rather than opening a new PR.
    • Included AI-agent disclosure in the PR comment.
  • ✅ Changes were concise.

    • No extraneous file changes were introduced.
    • The rebase dropped already-upstream stacked changes and left only the intended PR documentation diff.
  • ✅ Validation was completed.

    • Ran git diff --check.
    • Ran a lightweight docs validation for docs.json, MDX code fences, Tabs-like components, and local links.

@enyst enyst marked this pull request as ready for review June 10, 2026 17:15
@enyst enyst requested a review from xingyaoww as a code owner June 10, 2026 17:15
@enyst enyst requested a review from all-hands-bot June 10, 2026 17:16

all-hands-bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Review complete.

This review was performed through OpenHands Cloud Automation. You can log in and view the conversation here.

@all-hands-bot all-hands-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

🟢 Good taste — This is a documentation expansion that significantly improves the OpenAI-compatible endpoint guide. The restructured content is clearer and the client recipes section is a valuable addition.

Summary

The PR expands the OpenAI-compatible endpoint documentation with:

  • A restructured "What to Configure" + "Prepare a Profile" flow
  • Client recipes for curl, Python SDK, JavaScript SDK, Chat UIs, and Voice/Webhook integrations
  • A new "Conversation State" section explaining state management
  • Cross-references added to overview pages and the SDK landing page

This is a documentation-only PR. The content is technically sound and the examples are accurate.

Minor Suggestions

🟡 Suggestion — [sdk/guides/agent-server/openai-gateway.mdx, lines 169-185] The Voice/Webhook code snippet references conversation_ids without showing its initialization. Consider adding a brief initialization example:

# conversation_ids: dict[str, str] = {}

🟡 Suggestion — [sdk/guides/agent-server/openai-gateway.mdx, line 176] The Voice/Webhook example hardcodes model="openhands_gateway_demo" while other examples use the OPENHANDS_MODEL variable. For consistency, consider using the same pattern:

model=os.environ.get("OPENHANDS_MODEL", "openhands_gateway_demo")

[RISK ASSESSMENT]

  • [Overall PR] ⚠️ Risk Assessment: 🟢 LOW
  • This is a pure documentation change. No code, dependencies, or build configuration modified. Changes are additive documentation improvements with no breaking changes.

VERDICT:
Worth merging — Documentation is well-written, accurate, and adds significant value. The minor suggestions are optional improvements.

KEY INSIGHT:
The new client recipes section with tabs is an excellent pattern that makes the documentation immediately actionable for users with different preferred tools.


This review was generated by an AI agent (OpenHands) on behalf of the user through OpenHands Automation. View conversation

Comment thread sdk/guides/agent-server/openai-gateway.mdx
Comment thread sdk/guides/agent-server/openai-gateway.mdx Outdated
@enyst

enyst commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

@OpenHands please address the review and inline threads issues. Push the fixes. Then re-ask for the same bot review using gh api

@openhands-ai

openhands-ai Bot commented Jun 10, 2026

Copy link
Copy Markdown

I'm on it! enyst can track my progress at all-hands.dev

Co-authored-by: openhands <openhands@all-hands.dev>
@enyst enyst requested a review from all-hands-bot June 10, 2026 18:25

all-hands-bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Review complete.

This review was performed through OpenHands Cloud Automation. You can log in and view the conversation here.

@openhands-ai

This comment was marked as duplicate.

@all-hands-bot all-hands-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review: PR #563 - docs: expand OpenAI-compatible endpoint recipes

Taste Rating: 🟢 Good taste

This PR significantly expands the OpenAI-compatible endpoint documentation with well-organized client recipes. The structure is clear and the content is technically sound.

Summary

The changes add comprehensive documentation for accessing the OpenHands agent-server via the OpenAI Chat Completions protocol, including:

  • Configuration table at the top for quick reference
  • Profile preparation with curl commands
  • Client recipes for curl, Python SDK, JavaScript SDK, Chat UIs, and Voice/Webhook integrations
  • Conversation state management explanation
  • Current limitations clearly documented

No Critical Issues

This is documentation-only with no code changes, so standard critical issues (security, data structures, breaking changes) don't apply.

Minor Observations

  • [sdk/guides/agent-server/openai-gateway.mdx] The diff appears truncated at "Ready-to-run example" — verify this section is complete and not cut off.

Good Patterns

  • Clear, practical examples with real-world use cases (voice platforms, webhook integrations)
  • Honest disclosure of current limitations (no streaming, no tool calls)
  • Helpful cross-references to the new endpoint from overview docs
  • The <Tabs> component usage for client recipes is a good pattern for documentation

[RISK ASSESSMENT]

  • [Overall PR] ⚠️ Risk Assessment: 🟢 LOW

Documentation-only changes. No security, breaking change, or data structure concerns. The new content adds value without introducing risk.


VERDICT:
Worth merging: Documentation is well-structured, technically accurate, and provides practical value for users wanting to integrate OpenHands with OpenAI-compatible clients.

KEY INSIGHT:
The new client recipes (especially the Voice/Webhook integration pattern) will significantly reduce integration friction for users who want to connect OpenHands to existing OpenAI-compatible tooling.


This review was generated by an AI agent (OpenHands) on behalf of the user through OpenHands Automation. View conversation

@enyst enyst merged commit fd8494a into main Jun 10, 2026
4 checks passed
@enyst enyst deleted the openhands/openai-compatible-endpoint-docs branch June 10, 2026 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: OpenAI-compatible /v1/chat/completions gateway for the agent-server

2 participants